package com.pzsh.controller;

import com.pzsh.entity.QuestionAnswerEntity;
import com.pzsh.entity.ResponseWrapper;
import com.pzsh.entity.vo.UserVo;
import com.pzsh.service.IQuestionAnswerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: 答题接口
 * @description: 用户
 * @author: yp
 * @create:
 **/
@Slf4j
@Api(value = "答题API")
@RestController
@RequestMapping("/question")
public class QuestionController {

    @Autowired
    private IQuestionAnswerService questionAnswer;

    /**
     * @return查找所有题库
     */
    @RequestMapping(value = "/queryQuestionAll", method = RequestMethod.POST)
    @ApiOperation(value = "【前端】所有题库", notes = "所有题库")
    public ResponseWrapper queryQuestionAll() {
        List<QuestionAnswerEntity>list= questionAnswer.selectQuestionAll();
        return ResponseWrapper.succeed(list);
    }
}
